/*
 * @Descripttion: 权限接口
 * @version:
 * @Author: cxguo
 * @Date: 2019-08-02 15:03:05
 * @LastEditors: cxguo
 * @LastEditTime: 2019-09-24 14:57:56
 */
import axios from '@/utils/request'
const baseUrl = '/admin/permission-controller'

export function saveData(params) {
  return axios.request({
    url: `${baseUrl}/savedata`,
    method: 'post',
    data: params
  })
}

export function delListData(params) {
  return axios.request({
    url: `${baseUrl}/del-listdata`,
    method: 'post',
    data: params
  })
}

export function getpermissionsAll(params) {
  return axios.request({
    url: `${baseUrl}/getpermissions-all`,
    method: 'get',
    data: params
  })
}

export function getpermissionsByRoleId(params) {
  return axios.request({
    url: `${baseUrl}/getpermissions-by-roleid`,
    method: 'post',
    data: params
  })
}
